import request from '@/utils/request'

// 查询仓库库位列表
export function listStockPosition(query) {
  return request({
    url: '/distribution/stockPosition/list',
    method: 'get',
    params: query
  })
}

// 查询仓库库位详细
export function getStockPosition(id) {
  return request({
    url: '/distribution/stockPosition/' + id,
    method: 'get'
  })
}

// 新增仓库库位
export function addStockPosition(data) {
  return request({
    url: '/distribution/stockPosition',
    method: 'post',
    data: data
  })
}

// 修改仓库库位
export function updateStockPosition(data) {
  return request({
    url: '/distribution/stockPosition',
    method: 'put',
    data: data
  })
}

// 删除仓库库位
export function delStockPosition(id) {
  return request({
    url: '/distribution/stockPosition/' + id,
    method: 'delete'
  })
}
